#include "types.h"
#include "kernel.h"
#include "service_scheduling.h"
#include "..\config\service_scheduling_config.h"

#define NUMBER_OF_TASKS()	(sizeof(taskSet) / sizeof(taskSet[0]))


void service_scheduling_init(void)
{
}

void service_scheduling_executeSystem(void)
{
	U32 i;

	for(i = 0; i < NUMBER_OF_TASKS(); i++)
	{
		OSTaskCreateExt(taskSet[i].function,
						(void *)0,
						&taskSet[i].stack[taskSet[i].stackSize - 1],
						taskSet[i].priority,
						taskSet[i].priority,
						&taskSet[i].stack[0],
						taskSet[i].stackSize,
						(void *)0,
						OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR);
	}

	OSStart();
}
